package chap7.p1;

import java.util.Scanner;
public class Example2 {
    public static void main(String s[]){
        String name;
        int age;
        String address;
        //创建Scanner对象
        Scanner sc = new Scanner(System.in);
        System.out.println("请输入你的姓名：");
        name = sc.nextLine(); //输入后按回车键确认
        System.out.println("年龄：");
        age = sc.nextInt();
        System.out.println("地址：");
        address=sc.next();
        System.out.println("姓名： "+name);
        System.out.println("年龄："+age);
        System.out.println("地址："+address);
    }
}
